package com.learn.run;

import com.learn.aop.DemoAnnotationService;
import com.learn.aop.DemoMethodService;
import com.learn.config.AopConfig;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

/**
 * @Author:Mark
 * @Description:
 * @Date: Created on 10:05 2018-11-13
 * @Modify by:
 */
public class RunAop {

  public static void main(String[] args) {
    AnnotationConfigApplicationContext context=new AnnotationConfigApplicationContext(AopConfig.class);
    DemoAnnotationService demoAnnotationService = context.getBean(DemoAnnotationService.class);
    DemoMethodService demoMethodService = context.getBean(DemoMethodService.class);
    demoAnnotationService.add();
    demoMethodService.add();
  }

}
